home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-04-25 | 576 b | 25 lines | [TEXT/EDIT] |
- //-------------------------------------------------------------------//
- // union
-
- // Syntax: union ( A , B )
-
- // Description:
-
- // The union function returns a vector set that is the union of the
- // two sets A, and B.
-
- // See Also: complement, intersection, set
- //-------------------------------------------------------------------//
-
- union = function ( A, B )
- {
- if (min (size (A)) != 1) {
- error ("union: 1st argument must be a vector");
- }
- if (min (size (B)) != 1) {
- error ("union: 2nd argument must be a vector");
- }
-
- return set ( [ A[:] ; B[:] ] )
- };
-